package com.me.libgdx_test;

public class ClassCharacterAilments {
	//int ail_mburn,ail_poison,ail_forget,ail_blind,ail_weakness,ail_static;
	private int[] ailments;
	//0=not afflicted 1=temp_affliction 2=perm_affliction
	ClassCharacterAilments(){
		ailments = new int[]{0,0,0,0,0,0};
	}
	ClassCharacterAilments(int ail_mburn,int ail_poison,int ail_forget,int ail_blind,int ail_weakness,int ail_static){
		ailments = new int[6];
		ailments[0] = ail_mburn;
		ailments[1] = ail_poison;
		ailments[2] = ail_forget;
		ailments[3] = ail_blind;
		ailments[4] = ail_weakness;
		ailments[5] = ail_static;
	}
	public void set_ailment(String ailment,int value){
		if(ailment=="mana_burn"){ailments[0] = value;}
		if(ailment=="poison"){ailments[1] = value;}
		if(ailment=="forget"){ailments[2] = value;}
		if(ailment=="blind"){ailments[3] = value;}
		if(ailment=="weakness"){ailments[4] = value;}
		if(ailment=="static"){ailments[5] = value;}
	}
	public int return_ailment(String ailment){
		if(ailment=="mana_burn"){return ailments[0];}
		if(ailment=="poison"){return ailments[1];}
		if(ailment=="forget"){return ailments[2];}
		if(ailment=="blind"){return ailments[3];}
		if(ailment=="weakness"){return ailments[4];}
		if(ailment=="static"){return ailments[5];}
		return 0;
	}
	public void cure_heal(){
		if(ailments[1]!=2){ailments[1]=0;}
		if(ailments[3]!=2){ailments[3]=0;}
		if(ailments[4]!=2){ailments[4]=0;}
	}
	public void cure_all(){
		for(int i = 0; i < ailments.length;i++){
			if(ailments[i]!=2){
				ailments[i] = 0;
			}
		}
	}
}
